package com.itheima.Service.Impl;


import com.itheima.Mapper.rewardMapper;

import com.itheima.Pojo.Reward;
import com.itheima.Service.rewardService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class rewardServiceImpl implements rewardService {
    @Autowired
    private rewardMapper rewardMapper;

    @Override
    public List<Reward> getAll() {
        return rewardMapper.selectAllReward();
    }
    @Override
    public void add(Reward reward) {
        rewardMapper.insertReward(reward);
    }

    @Override
    public void update(Reward reward) {
        rewardMapper.updateReward(reward);
    }

    @Override
    public void deleteById(Integer id) {
        rewardMapper.deleteRewardById(id);
    }
}
